<?php

/**
 * Impress - Open source digital signage
 *
 * @link http://digitalsignage.tk
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 *
 * @category Impress
 * @package Impress
 */

/**
 * This class provides debugging tools.
 *
 * @package Impress
 * @subpackage Core
 */

class ADS_Debug {
    public static function dump($var){
        if(!ADS_DEBUG){
            return false;
        }
        if($var instanceof Exception){
            $debug = '<pre>';
            $debug .= var_export($var,true);
            $debug .= '</pre>';
            ADS_Output::appendToOutput($debug);
        }else
        {
            print '<pre>';
            var_dump($var);
            print '</pre>';
        }
    }
}
